package router

import (
	"github.com/gin-gonic/gin"
	"net/http"
	"pet-manager/handler"
)

func Init() *gin.Engine {

	r := gin.Default()

	r.GET("/", func(c *gin.Context) {
		c.String(http.StatusOK, "hello World!")
	})
	r.POST("/login", handler.Login) //登录
	r.POST("/add", handler.Add)     //添加
	r.GET("/list", handler.List)    //列表
	return r

}
